<?php
namespace Badmins\Model;
use Think\Model;
class GroupBuyingModel extends  Model{
	protected $_validate = array(
			array('name','require','活动名称必须'),
			array('start_time','require','活动开始时间必须'),
			array('end_time','require','活动结束时间必须'),
			array('price','double','活动价格填写错误'),
			array('stor_num','number','活动库存必须'),
			array('start_time,end_time','cktime','结束时间必须大于开始时间',1,'callback',3),
	);
	public function cktime($data){
		if($data['end_time']<$data['start_time']){
			return false;
		}else{
			return true;
		}
	}
}